﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SimpleActionThrowExceptionOnUndo.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Defines the SimpleActionThrowExceptionOnUndo type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.Saf.Tests.Support.Actions
{
    using System;
    using System.Collections.Generic;

    using Collaboris.Saf.Engine;

    using Entities;

    public class SimpleActionThrowExceptionOnUndo : ActionBase<StringList>
    {
        protected override ProcessStatus DoAction(SafContext context, StringList entity)
        {
            return ProcessStatus.Success;            
        }

        /*
        /// <summary>
        /// Return the name of this Action
        /// </summary>
        /// <returns></returns>
        public override string Name
        {
            get
            {
                return "Collaboris.SharePoint.Libary.Tests.Support.Actions.SimpleActionThrowExceptionOnDo";
            }
        }
        */

        protected override ProcessStatus UndoAction(SafContext context, StringList entity)
        {
            throw new Exception("test");
        }
    }
}